The generation and processing of graphic images using computers (so-called "computer graphics (CG)") is an example of the expansion in the use of computers. Recently, as the capabilities of computer displays have been improved, and their graphic functions enhanced, the focus has been placed on "3D Graphics", whereby a three-dimensional object is rendered on a two-dimensional medium for display on a screen. With the 3D graphics, an optical phenomenon of a 3D object when it is irradiated by a light source is provided by using a mathematical model, and based on the model, the surface of the object is described by using shading or perspective, or a pattern is used to represent the surface, for the display of a more realistic and colorful 3D image. The 3D graphic techniques have been used more frequently for CAD/CAM in science, in engineering, in manufacturing, and in other application fields, and for the development of various software applications.
Graphics System
The graphics system comprises a "geometric sub-system", generally as a front-end, and a "raster sub-system", generally as a back-end.
The geometric sub-system regards a graphic object as a set of polygons (normally, triangles), and performs schematic geometric processing for each polygon. The geometric processing performed by the geometric sub-system determines the position of an object on a computer screen. More specifically, geometric calculations, such as coordinate transformation, clipping, and light source calculation, are performed only on the coordinates of the individual vertexes defining the polygons. Coordinate transformation is a process for transforming the coordinates for the vertexes of a given polygon in accordance with the position of a visual point. Clipping is a process for removing portions of a polygon that lie outside the limits of a computer screen. Light source calculation is a process for calculating a luminance at each vertex based on its positional relationship with a light source.
The raster sub-system interpolates image parameters for all the pixels in a polygon by using image parameters acquired for the vertexes of the polygon. The image parameters are color data indicated by RGB, and a Z value representing the distance in the direction of the depth. In the latest highly colorful 3D graphic processing, fog "f" to represent distance and texture t to represent a material and a pattern on the surface of an object are included as image parameters, which are also calculated for each pixel. The polygon is represented in two dimensions and an object without a texture is merely an inorganic image obtained by shifting each plane in parallel or rotating it in accordance with a visual point. Therefore, the processing for putting texture on the surface of an object (texture mapping) is very important for the quality and the realism of an object. However, the amount of bit mapped texture data required for surface patterns is generally enormous, and a huge memory resource is thus required.
Parallel processing for graphics system
Since the capabilities of signal processing are limited when a large amount of calculations must be performed in real time, a multiprocessing technique that performs parallel processing using a plurality of node processors has been used. Since 3D graphic processing requires an enormous amount of calculations and data for image generation, parallel processing is used for enhancement of functions and performances.
In the above described graphics system, while the geometric sub-system performs calculations for each polygon, the raster sub-system performs calculations for each pixel in a polygon. In other words, the processing unit at the front-end and the back-end differ from each other. The sub-systems at the front-end and at the back-end frequently have separate inherent parallel structures to independently provide improved functions and performances. A system design in which the sub-systems adopt different parallel structures is described in, for example, Chapter 18 of "Computer Graphics" (J. D. Foley: second edition, Addison-Wesley).
FIG. 6 is a schematic diagram illustrating a hardware arrangement for a graphics system that comprises two different parallel structures. The graphics system includes a dispatch processor 10; a plurality of geometry node processors 20; a merge processor 30; a plurality of raster node processors 40; and a frame buffer 50.
The dispatch processor 10 distributes drawing instructions sets for the geometric processing of a 3D object to each of the geometry node processors 20. More specifically, the dispatch processor 10 is connected to another host computer system (not shown) via a bus. On the bus, the dispatch processor 10 sequentially receives a set of drawing instructions (also called a "data set"), and distributes the data sets so as to equalize the work loads imposed on the respective node processors 20. In other words, an data set is the unit to be distributed to the node processors 20. A data set is generally a set of data for defining one polygon (or a part of a polygon) and includes coordinate values for the vertexes, and attribute information, such as line widths, line types and texture IDs for specifying texture.
The geometry node processors 20, which constitute the core of the geometric sub-system, perform parallel geometric calculations for a 3D object. Each of the geometric node processors 20 performs coordinate transformation, clipping, and light source calculation for a received data set, and outputs the results to the merge processor 30.
The merge processor 30 merges the data sets transmitted from the geometry node processors 20, and imposes on the succeeding raster sub-system the rasterization of the data sets. The raster sub-system shown in FIG. 6 has a parallel structure including a plurality of raster node processors 40. The merge processor 30 also serves as a dispatch processor for the raster sub-system. That is, when the merge processor 30 receives a data set that has been geometrically processed, it distributes, to the raster node processors 40, the pixels in the screen regions defined by the data sets.
The raster node processors 40, which constitute the core of the raster sub-system, rasterize the distributed pixels. Since data sets are distributed to the raster node processors 40 as pixel units, which are smaller than data set units, more raster node processors 40 are provided than the geometry node processors 20. The raster node processors 40 employ image parameters (color data, such as RGB and fog) that have been acquired for each vertex to interpolate the image parameters for distributed pixels and to put texture image (texture mapping).
The results obtained by the raster node processors 40 are appropriately written to corresponding addresses in the frame buffer 50. The drawing information is read from the frame buffer 50 and is displayed on an attached display 60.
Problems with parallel graphics system
In a parallel geometric sub-system, several problems have arisen at the front-end.
One of these problems is the maintenance of the drawing order for drawing data sets. The problem concerns serialization. The data sets for geometric processing for a 3D object are distributed to the geometry node processors 20 as polygon units. However, the geometry node processors 20 do not always terminate their processing in the order in which the data sets were distributed. Data sets are not so generated that the work loads imposed on the geometry node processors 20 are equalized, and the time required for the geometric processing of the individual data sets is generally not the same. When, for example, data sets are distributed in order as polygons #1, #2 and #3, the geometry node processors 20 do not always terminate their processing so as to maintain that set order. The order in which the data sets are output may be different, such as polygons #2, #1 and #3.
So long as the data sets are related only to 3D graphics, no problems concerning serialization occur. Since the data sets for a 3D object include a Z value, hidden line removal is performed to prevent the view of a polygon in the front from being obscured by a polygon at the back. In other words, so long as only 3D graphics are used to construct a display screen, the drawing is arbitrarily performed, regardless of the drawing order. However, since a two-dimensional graphic, such as a menu window, does not include a Z value, the portion of the menu window that a later drawn polygon overlaps may be covered. Many conventional application programs distribute data sets for two-dimensional graphics last, so that the view of them will not be obscured. To generate a graphic shown in FIG. 7, for example, data sets are supplied in the order shown in FIG. 8. It is therefore necessary for the graphics system to maintain the data set order while transmitting the data sets to the raster sub-system, so as to maintain compatibility with conventional application programs.
The problem concerning the drawing order is resolved relatively easily in the system shown in FIG. 6, by adding to the merge processor 30 a function for serializing the data sets, for example. In accordance with the example in FIG. 8, even though the data set for the 2D menu was geometrically processed earlier than the data set for the polygon #3, the data set for polygon #3 is always transmitted to the raster sub-system first. Accordingly, even when the periods required for geometric processing of data sets are varied, and the data sets are transmitted to the merge processor 30 in a different order, the data sets are serialized by the merge processor 30 when transmitted to the raster sub-system. As a result, the desired display shown in FIG. 7 can be obtained.
Another problem with the parallel geometric sub-system involves the management of the memory resource for a raster sub-system. The raster sub-system also performs texture mapping in a screen region defined by a data set. In general, all of the texture data required for 3D graphics are held by a host computer system to which a graphics system is adapted. Generally, the raster sub-system includes a memory resource (not shown) that is adequate for the temporary storage of work data, and requested texture data are downloaded to the memory resource.
The size of the texture data is usually large. If the raster sub-system prepares a memory resource large enough to store texture data of all types, i.e., all the texture data stored in the host computer system, a huge memory capacity will be required and memory costs will be increased. And if unnecessary texture data are stored in the raster sub-system, it will not be used efficiently and the benefits provided by the memory resource will be wasted.
When only a part of the texture data is stored in the memory resource of the raster sub-system, a problem arises concerning which operating unit should manage the memory resource. The size of the texture data is large, as mentioned above, and downloading the texture data from the host computer system takes time. If the raster sub-system is in charge of managing the memory resource, for example, it is inevitable that its performance will be impaired. This is because when the raster node processors 40 are aware of the absence of desired texture data and they download the data, the time that elapses before rasterization is begun will be extended.
In addition, it is also difficult for the geometry node processors to manage the memory resource for the raster sub-system. Since the geometry node processors 20 do not know which data sets are being handled by other parallel processing geometry node processors, and since the serialization is performed after the geometric processing, rasterization of the data sets is not performed in the order in which the data sets were output by the geometry node processors 20.
In some systems (e.g., graphics system "GXT 1000" by IBM Corp.), when the memory resource is filled, the geometric sub-system serves as a single processor to facilitate the management of the memory resource. This system, however, adversely affects performance, and does not fully take the advantage of the parallel processing.
Therefore, it is one object of the present invention to provide an excellent graphics system for generating a computer graphics (CG) display screen.
It is another object of the present invention to provide an excellent graphics system that comprises a parallel processing geometric sub-system for dividing a graphic object into multiple polygons, and for performing geometric calculations only for the vertexes of the polygons; and a raster sub-system for interpolating image data for pixels in the polygons.
It is an additional object of the present invention to provide an excellent graphics system in which geometric sub-system does not have to take into consideration a memory resource of a raster sub-system.
It is a further object of the present invention to provide an excellent graphics system, which has a parallel processing geometric sub-system, that can efficiently manage a memory resource for a raster sub-system.